📕 subnode [[@ryan/20210314121301 functional_application]]
in 📚 node [[20210314121301-functional_application]]
Functional application is the act of applying arguments to a function In programming this is usually distinct from simply calling a function.
In a Lisp usually this means taking an actual list of arguments and calling a function with it:
(apply 'car '((1 2 3)))
1
Compare that with:
(car '(1 2 3))
1
In the first instance, the outer list is supplying the list of arguments to
car
.
In Lisp functional application is the cornerstone of a Lisp interpreter, where often in the source code a function's arguments are quite literally applied to it.
Or, consider the following in JavaScript
const add = (x, y, z) => x + y + z; console.log(add.apply(null, [1, 2, 3]));
: 6
📖 stoas
- public document at doc.anagora.org/20210314121301-functional_application
- video call at meet.jit.si/20210314121301-functional_application